//--------------------------------------------------------------------------------
// This file is a portion of the PracticeEngine Rendering Engine.  It is distributed
// under the MIT License, available in the root of this distribution and 
// at the following URL:
//
// http://www.opensource.org/licenses/mit-license.php
//
// Copyright (c) Ferdinand Li 
//--------------------------------------------------------------------------------
#ifndef WinApp_h__
#define WinApp_h__

#include <Windows.h>
#include "PCH.h"
#include "AppFramework.h"
#include "IRenderer.h"
#include "SceneManager.h"
#include "Camera.h"
#include "InputManager.h"

namespace PracEng
{
	class WinApp : public AppFramework
	{
	public:
		WinApp();
		virtual ~WinApp();

		virtual void Initialize();
		virtual void Update(double DeltaTime);
		virtual void Exit();
		virtual void Run();

		virtual void OnInit();
		virtual void OnExit();

		inline HWND GetWnd(){return m_hWnd;}
		static WinApp* GetApp();

		inline InputManager* GetInputMgr(){ return m_InputMgr; }
		inline SceneManager* GetSceneMgr(){ return m_SceneMgr; }
		inline Camera* GetCamera(){ return m_Camera; }
	protected:
		void InitWindow();
		void InitRenderer();
		
	//private:

		HWND m_hWnd;
		DWORD WindowStyle;
		int SizeX;
		int SizeY;
		std::wstring CaptionName;
		IRenderer* m_Renderer;
		SceneManager* m_SceneMgr;
		Camera* m_Camera;
		InputManager* m_InputMgr;

	protected:
		static WinApp* m_App;
	};
}

#endif // WinApp_h__